<html>
<head>
<title>
app - Helma Javascript Reference
</title>

<meta http-equiv="Content-Script-Type" content="text/javascript">
<script src="scripts.js"></script>
<link rel="stylesheet" href="styles.css" media="screen" />
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    <script type="text/javascript">_uacct = "UA-737027-2";urchinTracker();</script>
<style>
td {
    font-family: "Trebuchet MS", sans-serif; 
    font-size: 13px; 
    line-height:135%;
}
.columnheight {
    height: 1350px;
}
</style>
</head>
<body bgcolor="white">

<div class="frame">

<img class="home" onclick="location='http://dev.helma.org/'" src="helmaheader.gif" /><br />
<div class="lead">
    <p>Detailed reference of prototypes, properties and methods available in the <br />
    Javascript environment of your Helma web applications.</p>
</div>

<script> openbox('content') </script>


    <div class="content">
        <div class="docs">
        
            <!--
            <div class="sectionHead">Library: app.js</div>
            -->
            <div class="section overview">
            <!--
                <div class="itemTitle">
                    Overview
                </div>
            -->
                <div>   
                    <div class="desc">Default properties and methods of the app object.</div>
                    <div class="itemTags">
            <!--
                    <ul>
                        
                    
                    </ul>
            -->
                    </div>
                </div>
            </div>
            
            <!--
            <div class="sectionHead">Constructors</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <!--
            <div class="sectionHead">Namespaces</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <!--
            <div class="sectionHead">Properties</div>
            -->
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app"></a>
                    
                    <span class="type">ApplicationBean</span>
                    
                    
                    
                    
                        <i><span class="symbolname">app</span></i>
                    
                    
                </div>
                
                
                    <div class="desc">This object is automatically instantiated as the app property 
of the global object (or global.app) and there is no constructor 
to instantiate further instances.
<br /><br />
The app object is a host object representing the application 
for which the current scripting environment is provided.
<br /><br />
For further details also see the JavaDocs for 
Packages.helma.framework.core.ApplicationBean. Since that class is a 
JavaBean all of its get- and set-methods are also directly 
available as properties of this object.</div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="http://adele.helma.org/download/helma/apidocs/api/helma/framework/core/ApplicationBean.html">Packages.helma.framework.core.ApplicationBean</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.__app__"></a>
                    
                    <span class="type">Application</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">__app__</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">This property contains a reference this application's instance of the Packages.helma.framework.core.Application class.
<br /><br />
It represents the currently running application, and 
offers some additional public methods. See Helma's JavaDocs 
on Packages.helma.framework.core.Application for more information.</div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="http://adele.helma.org/download/helma/apidocs/api/helma/framework/core/Application.html">Packages.helma.framework.core.Application</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.data"></a>
                    
                    <span class="type">TransientNode</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">data</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Object that serves as a cache for application specific data.
<br /><br />
This property offers the possibility to store arbitrary data 
on an application wide level, and is available as long as the 
application is running.
<br /><br />
Note, that this can just be used as a temporary storage 
(i.e. as a 'cache'), since this data is not stored persistently 
within Helma, and is lost when the application is restarted. 
However, unlike global properties, any data stored in this 
object will not be garbage collected during runtime.
<br /><br />
Example:
<pre>app.data.runlevel = 4;
app.data.language = "en";
&nbsp;
res.write(app.data);
<i>TransientNode app</i>
&nbsp;
for (var p in app.data)
&nbsp;&nbsp;res.writeln(p + ": " + app.data[p]);
<i>runlevel: 4
language: en</i>
&nbsp;
res.write(app.data.runlevel);
<i>4</i>
&nbsp;
res.write(app.data["language"]);
<i>en</i></pre></div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.modules">app.modules</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.globalMacroPath"></a>
                    
                    <span class="type">String[]</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">globalMacroPath</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">The app.globalMacroPath property allows to define a search path for global macros. 
This is a String array containing a list of global namespaces.</div>
                
                
                
                
                
                
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.maxThreads"></a>
                    
                    <span class="type">Number</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">maxThreads</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">This property contains the maximum number of additional threads (=request evaluators)
<br /><br />
The maximum number of additional threads that are being 
created by Helma to handle incoming requests. This property 
is readable and writeable.</div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getActiveThreads">app.getActiveThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getFreeThreads">app.getFreeThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getMaxThreads">app.getMaxThreads</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.modules"></a>
                    
                    <span class="type">Map</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">modules</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Map object that can be used as an application wide data cache
<br /><br />
This property offers a dedicated place to store 
module-related data on an application wide level. 
Note, that this can just be used as a temporary 
storage (i.e. as a 'cache'), since this data is not 
stored persistently within Helma, and is lost when 
the application is restarted.</div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.data">app.data</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.properties"></a>
                    
                    <span class="type">Map</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">properties</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Map of any specified application or server properties
<br /><br />
This property offers access to each key/value 
pair defined in either app.properties or in 
server.properties. These properties are read-only.
<br /><br />
To get a Map of apps.properties for this application,
use the app.getAppsProperties method instead.
<br /><br />
Example:
<pre># File app.properties:
debug = true
color = #ffcc00
&nbsp;
res.write(app.properties);
<i>{debug=true,color=#ffcc00}</i>
&nbsp;
for (var p in app.properties)
&nbsp;&nbsp;res.writeln(p + ": " + app.properties[p]);
<i>debug: true
color: #ffcc00</i>
&nbsp;
res.write(app.properties.debug);
<i>true</i>
&nbsp;
res.write(app.properties["color"]);
<i>#ffcc00</i></pre></div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="getAppsProperties.html">getAppsProperties</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.processMacroParameter"></a>
                    
                    <span class="type">Function</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">processMacroParameter</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">This allows the application to set a callback function for pre-processing 
macro parameters formatted as $(...). The function is expected to take 
the raw parameter value as argument and return the processed parameter.</div>
                
                
                
                
                
                
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="app.repositories"></a>
                    
                    <span class="type">Array</span>
                    
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">repositories</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">List of the application's code repositories
<br /><br />
Returns an array of FileRepository, SingleFileRepository, 
MultiFileRepository and ZipRepository objects.</div>
                
                
                
                
                
                
                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.addRepository">app.addRepository</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="http://adele.helma.org/download/helma/apidocs/api/helma/framework/repository/FileRepository.html">Packages.helma.framework.repository.FileRepository</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="http://adele.helma.org/download/helma/apidocs/api/helma/framework/repository/SingleFileRepository.html">Packages.helma.framework.repository.SingleFileRepository</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="http://adele.helma.org/download/helma/apidocs/api/helma/framework/repository/MultiFileRepository.html">Packages.helma.framework.repository.MultiFileRepository</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="http://adele.helma.org/download/helma/apidocs/api/helma/framework/repository/ZipRepository.html">Packages.helma.framework.repository.ZipRepository</a></div></td></tr>
                
                </table>
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            

            <!--
            <div class="sectionHead">Constructors</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <div class="sectionHead">Methods</div>
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.addRepository"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">addRepository</span>(<span class="signature">repository, repository</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Adds a code repository to the current application</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            repository
                        </td>
                        <td>
                            as String, the path to the code repository
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Repository
                        </td>
                        <td>
                            repository
                        </td>
                        <td>
                            as a Repository object, implementing the Repository interface
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.repositories">app.repositories</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.addCronJob"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">addCronJob</span>(<span class="signature">functionName, crontab</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Adds a global function to the list of CronJobs that are being called periodically.
<br /><br />
If the property 'schedulerInterval' has not been set 
otherwise in app.properties, the function will be called 
every 60 seconds.
<br /><br />
By passing along further arguments it is possible to define 
at what times that function should be called. The same syntax 
('*', '1,10,15', '1-5',..) as for Unix' crontab file can be used. 
Note, that if the property 'schedulerInterval' has been set in 
app.properties below 60, the function will be called several 
times in the minute, that it is supposed to run.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            functionName
                        </td>
                        <td>
                            as String, name of function to be scheduled as cron job
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            crontab
                        </td>
                        <td>
                            syntax of comma delimited arguments for year, month, day, weekday, hour, minute
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getCronJobs">app.getCronJobs</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.removeCronJob">app.removeCronJob</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.clearCache"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">clearCache</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Removes all objects from the object cache for the current application.
<br /><br />
By calling this method it is possible to make sure Helma 
will fetch all objects fresh from the database.</div>
                

                
                
                
                
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getCacheUsage">app.getCacheUsage</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.countSessions"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">countSessions</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of currently active sessions.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of sessions (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.createSession">app.createSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSession">app.getSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessions">app.getSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessionsForUser">app.getSessionsForUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.createSession"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">createSession</span>(<span class="signature">String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Creates a SessionObject with the passed sessionID as its unique identifier.
<br /><br />
If a session with that ID already exists, that session will be returned.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            of the ID for this session
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            SessionObject for the specified
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.countSessions">app.countSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSession">app.getSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessions">app.getSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessionsForUser">app.getSessionsForUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.debug"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">debug</span>(<span class="signature">filenameOrText, text</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Writes a string to a log file if debug is set to true in app.properties.
<br /><br />
Either the text provided as the first argument is written 
to the eventLog file or the text that is provided as the second 
argument is written to a log file who's name is specified as the 
first argument.
<br /><br />
Writing to a file can be overridden by setting the property 
"logdir" in the server.properties or app.properties file to 
the value "console".
<br /><br />
Example:
<pre># File helma/apps/test/app.properties:
debug = true
&nbsp;
// File helma/apps/test/root/main.hac:
app.debug("This message is written to the test application's event log.");
app.debug("custom", "This message is written to the custom.log file.");
&nbsp;
File helma/log/test_event.log:
<i>[2006/07/11 17:08] This message is written to the test application's event log.</i>
&nbsp;
File helma/log/custom.log:
<i>[2006/07/11 17:08] This message is written to the custom.log file.</i></pre></div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            filenameOrText
                        </td>
                        <td>
                            as String, the log filename to write to or the text to write to the eventLog file
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            text
                        </td>
                        <td>
                            as String the text to write, if the filename was specified as the first argument
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.log">app.log</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getActiveThreads"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getActiveThreads</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of currently active threads (=request evaluators).</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of currently active threads (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getFreeThreads">app.getFreeThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getMaxThreads">app.getMaxThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.maxThreads">app.maxThreads</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getActiveUsers"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getActiveUsers</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns an array of Users, that are currently logged in.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Array of User objects
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getUser">app.getUser</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getRegisteredUsers">app.getRegisteredUsers</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.registerUser">app.registerUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getAppDir"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getAppDir</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the absolute path to the application directory.
<br /><br />
For multiple repositories this is either, the directory 
specified as 'appdir' in apps.properties, or the first 
FileRepository occurring in the repository list.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String with the absolut path to the application directory
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getDir">app.getDir</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getServerDir">app.getServerDir</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getAppsProperties"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getAppsProperties</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Get a wrapper around the app's apps.properties
<br /><br />
To get a Map of app.properties and server.properties for 
this application, use app.properties instead.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            a readonly wrapper around the application's apps.properties
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.properties">app.properties</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getCacheusage"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getCacheusage</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of currently cached objects for the current application.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of cached objects
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.clearCache">app.clearCache</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getClassLoader"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getClassLoader</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the app's ClassLoader.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            ClassLoader
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getCronJobs"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getCronJobs</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns an object of scheduled cron jobs.
<br /><br />
Returns a JavaScript object with the function names as 
property names and the Packages.helma.util.CronJob instance as 
property values.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Object with Packages.helma.util.CronJob properties
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.addCronJob">app.addCronJob</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.removeCronJob">app.removeCronJob</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getDir"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getDir</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the absolute path to the application directory.
<br /><br />
For multiple repositories this is either, the directory 
specified as 'appdir' in apps.properties, or the first 
FileRepository occurring in the repository list.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String with the absolut path to the application directory
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getAppDir">app.getAppDir</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getServerDir">app.getServerDir</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getErrorCount"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getErrorCount</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of errors that have occurred since the application has been started.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of errors (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getUpSince">app.getUpSince</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getFreeThreads"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getFreeThreads</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of currently free threads (i.e. request evaluators).
<br /><br />
This is equivalent to app.getMaxThreads() minus app.getActiveThreads().</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of free threads (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getMaxThreads">app.getMaxThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getActiveThreads">app.getActiveThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.maxThreads">app.maxThreads</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getLogger"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getLogger</span>(<span class="signature">logname</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the app's event logger. 
<br /><br />
This is a  commons-logging Log with the
category helma.[appname].event or the
specified logname.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            logname
                        </td>
                        <td>
                            as String, optional log category
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Log
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.log">app.log</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getMaxThreads"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getMaxThreads</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the maximum number of threads (i.e. request evaluators).</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of threads (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getActiveThreads">app.getActiveThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getFreeThreads">app.getFreeThreads</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.maxThreads">app.maxThreads</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getName"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getName</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the name of the current application, i.e. the name used in apps.properties.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String with application's name
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getPrototype"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getPrototype</span>(<span class="signature">name</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns a prototype by name.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            name
                        </td>
                        <td>
                            as String, the prototype name
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Prototype
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getPrototypes"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getPrototypes</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns an array of this app's prototypes</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Array containing the app's prototypes
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getRegisteredUsers"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getRegisteredUsers</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns an array of all existing users.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Array of User objects
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getActiveUsers">app.getActiveUsers</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getUser">app.getUser</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.registerUser">app.registerUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getRequestCount"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getRequestCount</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of web requests that occurred since the application has been started.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of web requests served (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getUpSince">app.getUpSince</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getServerDir"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getServerDir</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the absolute path to the home directory of this Helma installation.
<br /><br />
If Helma is run in embedded mode, this will be 
equal to the application directory.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String with absolute path to home directory
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getAppDir">app.getAppDir</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getDir">app.getDir</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getSession"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getSession</span>(<span class="signature">sessionID</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns a SessionObject identified through the passed sessionID, if such a session exists.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            sessionID
                        </td>
                        <td>
                            as String, the ID of an existing session
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            SessionObject matching the specified ID or null if there is no matching session
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.countSessions">app.countSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.createSession">app.createSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessions">app.getSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessionsForUser">app.getSessionsForUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getSessions"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getSessions</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns an array of all currently active sessions, represented as SessionObjects.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Array of SessionObject
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.countSessions">app.countSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.createSession">app.createSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSession">app.getSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessionsForUser">app.getSessionsForUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getSessionsForUser"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getSessionsForUser</span>(<span class="signature">user</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns an array of active sessions for the specified user
<br /><br />
Returns an array of all currently active sessions, which 
have been associated with the passed User. Returns an empty 
array if no User is passed.
<br /><br />
Passing a string of the username as argument has been 
deprecated in favor of passing a User object.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            User
                        </td>
                        <td>
                            user
                        </td>
                        <td>
                            as User object
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Array of SessionObject
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.countSessions">app.countSessions</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.createSession">app.createSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSession">app.getSession</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSessions">app.getSessions</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getSkin"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getSkin</span>(<span class="signature">protoname, skinname, skinpath</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns a skin for a given object.
<br /><br />
The skin is found by determining the prototype to use for 
the object, then looking up the skin for the prototype.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            protoname
                        </td>
                        <td>
                            as String
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            skinname
                        </td>
                        <td>
                            as String
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Array
                        </td>
                        <td>
                            skinpath
                        </td>
                        <td>
                            as Array, directory paths or HopObjects to search for skins
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Skin
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getSkinfiles"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getSkinfiles</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns a Map that allows access to all defined file-based skins.
<br /><br />
The map contains for each prototype one entry (for 
prototypes containing also uppercase letters, also an 
entry with the lowercased prototype name is contained). 
This entry contains for each skin file residing in that 
prototype directory, an entry with the name of the file 
and the content/source of that file as its value.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Map of SkinMap objects
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSkinfilesInPath">app.getSkinfilesInPath</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getSkinfilesInPath"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getSkinfilesInPath</span>(<span class="signature">skinpath</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Return a map of skin resources including the specified,
app-specific skinpath
<br /><br />
The map contains for each prototype one entry (for 
prototypes containing also uppercase letters, also an 
entry with the lowercased prototype name is contained). 
This entry contains for each skin file residing in that 
prototype directory, an entry with the name of the file 
and the content/source of that file as its value.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            Array
                        </td>
                        <td>
                            skinpath
                        </td>
                        <td>
                            as Array, directory paths or HopObjects to search for skins
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Map of SkinMap objects
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getSkinfiles">app.getSkinfiles</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getUpSince"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getUpSince</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the timestamp of when that application has been started.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Date when the application last started
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getErrorCount">app.getErrorCount</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getUser"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getUser</span>(<span class="signature">username</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns a User identified through the passed username.
<br /><br />
The prototype User must have a username defined 
through the '_name'-property in type.properties for 
this to work.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            username
                        </td>
                        <td>
                            as String
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            User object with the specified _name property
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getActiveUsers">app.getActiveUsers</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getRegisteredUsers">app.getRegisteredUsers</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.registerUser">app.registerUser</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.getXmlrpcCount"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">getXmlrpcCount</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Returns the number of XmlRpc requests that occurred since the application has been started.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number of XmlRpc requests served (integer)
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getUpSince">app.getUpSince</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.invoke"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">invoke</span>(<span class="signature">thisObject, fnc, args, timeout</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Trigger a synchronous Helma invocation.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            Object
                        </td>
                        <td>
                            thisObject
                        </td>
                        <td>
                            as Object, the object to invoke the function on, or null for global invocation
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Function
                        </td>
                        <td>
                            fnc
                        </td>
                        <td>
                            the function or function name to invoke
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Array
                        </td>
                        <td>
                            args
                        </td>
                        <td>
                            as Array, optional arguments to be passed to the function fnc
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Number
                        </td>
                        <td>
                            timeout
                        </td>
                        <td>
                            as Number, optional amount of milliseconds after which the invocation should be interrupted
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            the value returned by the function fnc
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">exceptions</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Exception exception thrown by the function
                        </td> 
                    </tr>
                
                </table>
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.invokeAsync">app.invokeAsync</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.invokeAsync"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">invokeAsync</span>(<span class="signature">thisObject, fnc, args, timeout</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Trigger an asynchronous Helma invocation. 
<br /><br />
This method returns immedately with an object that 
allows to track the result of the function invocation 
with the following methods and properties:
<ul>
<li>running - true while the function is running, false afterwards</li>
<li>result - the value returned by the function, if any</li>
<li>exception - the exception thrown by the function, if any</li>
<li>waitForResult() - wait indefinitely until invocation terminates
and return the result</li>
<li>waitForResult(t) - wait for the specified number of milliseconds
for invocation to terminate and return the result</li>
</ul>
Setting the timeout to -1 will let the task run forever instead 
of the default maximum of 15 minutes.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            Object
                        </td>
                        <td>
                            thisObject
                        </td>
                        <td>
                            as Object, the object to invoke the function on, or null for global invocation
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Function
                        </td>
                        <td>
                            fnc
                        </td>
                        <td>
                            the function or function name to invoke
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Array
                        </td>
                        <td>
                            args
                        </td>
                        <td>
                            as Array, optional arguments to be passed to the function fnc
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Number
                        </td>
                        <td>
                            timeout
                        </td>
                        <td>
                            as Number, optional amount of milliseconds after which the invocation should be interrupted
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Object with the properties described above
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.invoke">app.invoke</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.log"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">log</span>(<span class="signature">filenameOrText, text</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Writes a string to a log file.
<br /><br />
Either the text provided as the first argument is written 
to the eventLog file or the text that is provided as the second 
argument is written to a log file who's name is specified as 
the first argument.
<br /><br />
Writing to a file can be overriden by setting the property 
"logdir" in the server.properties or app.properties file to 
the value "console".
<br /><br />
Example:
<pre>app.debug("This message is written to the test application's event log.");
app.debug("custom", "This message is written to the custom.log file.");
&nbsp;
File helma/log/test_event.log:
<i>[2006/07/11 17:08] This message is written to the test application's event log.</i>
&nbsp;
File helma/log/custom.log:
<i>[2006/07/11 17:08] This message is written to the custom.log file.</i></pre></div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            filenameOrText
                        </td>
                        <td>
                            as String, the log filename to write to or the text to write to the eventLog file
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            text
                        </td>
                        <td>
                            as String the text to write, if the filename was specified as the first argument
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.debug">app.debug</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.registerUser"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">registerUser</span>(<span class="signature">username, password</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Creates a new User object
<br /><br />
Creates a new HopObject of prototype User, stores it 
persistently, and returns the created User object. 
<br /><br />
When mapping the User prototype to a relational 
database, the type.properties file must contain mappings
for the '_name'-property (the username) and for a 
property named 'password'.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            username
                        </td>
                        <td>
                            as String
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            password
                        </td>
                        <td>
                            as String
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            User object that was created
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getActiveUsers">app.getActiveUsers</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getUser">app.getUser</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getRegisteredUsers">app.getRegisteredUsers</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="app.removeCronJob"></a>
                    
                    
                        <i><a href="#app" class="type">app</a>.
                        <span class="symbolname">removeCronJob</span>(<span class="signature">functionName</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Removes a CronJob, identified through the passed function name, from the list of CronJobs.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            functionName
                        </td>
                        <td>
                            as String
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.addCronJob">app.addCronJob</a></div></td></tr>
                
                    <tr><td class="type"><div class="see"><a href="app.html#app.getCronJobs">app.getCronJobs</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
        </div>
    </div>
    <div class="finePrint">
    Fri, 05 Feb 2010 17:40:04 GMT.
    </div>

<script> closebox() </script>

<script> openbox('pageintro') </script>

    <h3>core framework</h3>
        <ul>            
            <li><a href="global.html">global</a></li>
            <li><a href="app.html">app (application)</a></li>
            <li><a href="req.html">req (request)</a></li>
            <li><a href="res.html">res (response)</a></li>
            <li><a href="session.html">session</a></li>
            <li><a href="global.html#path">path</a></li>
            <li><a href="global.html#root">root</a></li>
            <li><a href="HopObject.html">HopObject</a></li>
            <li><a href="User.html">User</a></li>
            <li><a href="File.html">File</a></li>
            <li><a href="FtpClient.html">FtpClient</a></li>
            <li><a href="Image.html">Image</a></li>
            <li><a href="Mail.html">Mail</a></li>
            <li><a href="global.html#Remote">Remote</a></li>
            <li><a href="Xml.html">Xml</a></li>
            <li><a href="DatabaseObject.html">DatabaseObject</a></li>
            <li><a href="MimePart.html">MimePart</a></li>
            <li><a href="Skin.html">Skin</a></li>
            <li><a href="global.html#Object.dontEnum">Object</a></li>
        </ul>
        
    <h3>optional modules</h3>
        <ul>            
            <li><a href="ArrayExtensions.html">Array extensions</a></li>
            <li><a href="DateExtensions.html">Date extensions</a></li>
            <li><a href="NumberExtensions.html">Number extensions</a></li>
            <li><a href="ObjectExtensions.html">Object extensions</a></li>
            <li><a href="StringExtensions.html">String extensions</a></li>
            <li><a href="HopObjectExtensions.html">HopObject extensions</a></li>
            <li><a href="GlobalMacros.html">global macros</a></li>
            <li><a href="MacroFilters.html">macro filters</a></li>
            <li><a href="JSON.html">JSON methods</a></li>
            <br />
            <li><a href="helma.Aspects.html">helma.Aspects</a></li>
            <li><a href="helma.Chart.html">helma.Chart</a></li>
            <li><a href="helma.Color.html">helma.Color</a></li>
            <li><a href="helma.Database.html">helma.Database</a></li>
            <li><a href="helma.File.html">helma.File</a></li>
            <li><a href="helma.Ftp.html">helma.Ftp</a></li>
            <li><a href="helma.Group.html">helma.Group</a></li>
            <li><a href="helma.Html.html">helma.Html</a></li>
            <li><a href="helma.Http.html">helma.Http</a></li>
            <li><a href="helma.Image.html">helma.Image</a></li>
            <li><a href="helma.Mail.html">helma.Mail</a></li>
            <li><a href="helma.Search.html">helma.Search</a></li>
            <li><a href="helma.Skin.html">helma.Skin</a></li>
            <li><a href="helma.Ssh.html">helma.Ssh</a></li>
            <li><a href="helma.Url.html">helma.Url</a></li>
            <li><a href="helma.Zip.html">helma.Zip</a></li>
            <br />
            <li><a href="jala.BitTorrent.html">jala.BitTorrent</a></li>
            <li><a href="jala.Captcha.html">jala.Captcha</a></li>
            <li><a href="jala.Date.html">jala.Date</a></li>
            <li><a href="jala.db.html">jala.db</a></li>
            <li><a href="jala.DnsClient.html">jala.DnsClient</a></li>
            <li><a href="jala.Form.html">jala.Form</a></li>
            <li><a href="jala.History.html">jala.History</a></li>
            <li><a href="jala.HopObjectExtensions.html">jala HopObject extensions</a></li>
            <li><a href="jala.HtmlDocument.html">jala.HtmlDocument</a></li>
            <li><a href="jala.I18n.html">jala.I18n</a></li>
            <li><a href="jala.ImageFilter.html">jala.ImageFilter</a></li>
            <li><a href="jala.IndexManager.html">jala.IndexManager</a></li>
            <li><a href="jala.ListRenderer.html">jala.ListRenderer</a></li>
            <li><a href="jala.Mp3.html">jala.Mp3</a></li>
            <li><a href="jala.PodcastWriter.html">jala.PodcastWriter</a></li>
            <li><a href="jala.RemoteContent.html">jala.RemoteContent</a></li>
            <li><a href="jala.Rss20Writer.html">jala.Rss20Writer</a></li>
            <li><a href="jala.Utilities.html">jala.Utilities</a></li>
            <li><a href="jala.XmlRpcRequest.html">jala.XmlRpcRequest</a></li>
            <li><a href="jala.XmlWriter.html">jala.XmlWriter</a></li>
        </ul>
    
    <h3>java libraries</h3>
        <ul>            
            <li><a href="http://www.docjar.org/">docjar search</a></li>
        </ul>

    <h3>properties files</h3>
        <ul>            
            <li><a href="http://dev.helma.org/docs/Properties+Files/apps.properties/">apps.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/app.properties/">app.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/server.properties/">server.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/db.properties/">db.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/class.properties/">class.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Type.properties+Documentation/">type.properties</a></li>
         </ul>
    
<script> closebox() </script>

</div>
<br clear="all" /><br /><br />



</body>
</html>
